<template>
		<navbar title="支付成功" :isBack="true"></navbar>
		<view class="" style="padding: 0 30rpx;">
			<view class="" style="display: flex;justify-content: center;align-items: center;margin-top: 100rpx;flex-direction: column;">
				<image src="/static/image/paysuc.png" style="width: 160rpx;height: 160rpx;" mode=""></image>
				<view class="" style="margin-top: 20rpx;text-align: center;font-size: 36rpx;font-weight: bold;">
					支付成功
				</view>
				<view class="" style="text-align: center;margin-top: 40rpx;font-size: 32rpx;">
					您的报名已成功！
				</view>
			</view>
			<view class="" style="margin-top: 170rpx;display: flex;justify-content: space-between;">
				<view class="" @click="home" style="border-radius: 10rpx;border: 1rpx solid #D2D2D2;height: 98rpx;display: flex;justify-content: center;align-items: center;color: #696969;font-size: 32rpx;width: 336rpx;">
					返回首页
				</view>
				<view class="" @click="order" style="border-radius: 10rpx;border: 1rpx solid #5062A7;height: 98rpx;display: flex;justify-content: center;align-items: center;color: #5062A7;font-size: 32rpx;width: 336rpx;">
					查看订单
				</view>
			</view>
		</view>
</template>

<script setup lang="ts">
		import { onLoad, onShow } from '@dcloudio/uni-app'
		import {ref} from 'vue'
		const type = ref(0) //1是七天速成 2是城市巡回 3是商城订单
		onLoad((options)=>{
			if(options.type){
				type.value = options.type
			}
		})
	const home = ()=>{
		uni.switchTab({
			url:'/pages/match/index'
		})
	}
	const order = ()=>{
		if(type.value == 1){
			uni.redirectTo({
				url:'/pagesB/mine/mineTrain/train?type=' + type.value
			})
			return
		}
		if(type.value == 2){
			uni.redirectTo({
				url:'/pagesB/mine/mineTrain/train?type=' + type.value
			})
			return
		}
		if(type.value == 3){
			//商城订单列表
			uni.redirectTo({
				url:'/pagesB/order/myOrder?type=1'
			})
		}
		uni.redirectTo({
			url:'/pagesB/mine/mineStudent/index'
		})
	}
</script>

<style>
</style>